package com.zhaohanlin.start;

import org.junit.Test;

/**
 * @author zhaohanlin
 */

public class AbstractClassTest {
    static abstract class BaseCar {
        public abstract void info();

    }

    static class Audi extends BaseCar {
        @Override
        public void info() {
            System.out.println("我是奥迪");
        }
    }

    static class AuTo extends BaseCar {
        @Override
        public void info() {
            System.out.println("我是奥托");
        }


    }


    @Test
    public void build() {
        BaseCar audi = new Audi();
        BaseCar auto = new AuTo();
        audi.info();
        auto.info();

    }
}

